from rest_framework import serializers
from goods.models import Carousel, Goods, Category, GoodImg, GoodsCollect


# 轮播图序列化器
class CarouselSer(serializers.ModelSerializer):
    class Meta:
        model = Carousel
        fields = "__all__"


# 商品
class GoodsSer(serializers.ModelSerializer):
    class Meta:
        model = Goods
        fields = "__all__"


# 类别
class CateSer(serializers.ModelSerializer):
    class Meta:
        model = Category
        fields = "__all__"


# 商品图片
class GoodsImgSer(serializers.ModelSerializer):
    class Meta:
        model = GoodImg
        fields = "__all__"


# 商品收藏
class GoodsCollectSer(serializers.ModelSerializer):
    class Meta:
        model = GoodsCollect
        fields = "__all__"
